using System;
using WCFServer.BusinessEntities;
using WCFServer.DataContracts;

namespace WCFServer.ServiceImplementation
{
    public static class TranslateBetweenKlientAndPlayer
    {
        public static WCFServer.BusinessEntities.Klient TranslatePlayerToKlient(WCFServer.DataContracts.Player from)
        {
            WCFServer.BusinessEntities.Klient to = new WCFServer.BusinessEntities.Klient();
            to.imie = from.imie;
            to.mail = from.mail;
            to.miasto = from.miasto;
            to.nazwisko = from.nazwisko;
            to.nick = from.nick;
            to.plec = from.plec;
            return to;
        }

        public static WCFServer.DataContracts.Player TranslateKlientToPlayer(WCFServer.BusinessEntities.Klient from)
        {
            WCFServer.DataContracts.Player to = new WCFServer.DataContracts.Player();
            to.imie = from.imie;
            to.mail = from.mail;
            to.miasto = from.miasto;
            to.nazwisko = from.nazwisko;
            to.nick = from.nick;
            to.plec = from.plec;
            return to;
        }
    }
}

